package com.wgchao.identityrightsmanagement.infrastructure.jpa.repository;

import com.wgchao.identityrightsmanagement.infrastructure.jpa.entity.SysBaseOffice;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: SysBaseOfficeRepository
 * @author: wgchao
 * @createTime: 2020/6/16 4:35 PM
 * @Description: TODO
 */
@Repository
public interface SysBaseOfficeRepository extends JpaRepository<SysBaseOffice, Long>, JpaSpecificationExecutor<SysBaseOffice> {
    SysBaseOffice findFirstByCodeAndDelFalse(String code);
    List<SysBaseOffice> findAllByAgencyCodeAndDelIsFalse(String agencyCode);
}
